import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: MyHome(),
  ));
}

class MyHome extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.red,
        title: Text('案例-商品订单信息'),
      ),
      // 清理 Body 中的代码
      
      body: ListView(
        // 改为横向滚动
        scrollDirection: Axis.horizontal,
        children: [
           Container(
            height: 80,
            color: Colors.blue,
            alignment: Alignment.centerLeft,
            child: const Text('鸿蒙大事件1'),
          ),
          // 帮我生成不同颜色的 Container
          for (var i = 0; i < 100; i++)
            Container(
              height: 80,
              color: Colors.primaries[i % Colors.primaries.length],
              alignment: Alignment.centerLeft,
              child: Text('鸿蒙大事件$i'),
            ),
        ],
      ) );
  }
}
